﻿using System.Linq.Expressions;
using Shop.Model.DB;
using Shop.RemoteModel.LogisticsTemplate.Model;
using WeDonekRpc.Model;

namespace Shop.Collect
{
    public interface ILogisticsTemplateCollect
    {
        long Add (LogisticsTemplateDatum datum);
        void Delete (DBLogisticsTemplate source);
        DBLogisticsTemplate Get (long id);
        Result Get<Result> (long id) where Result : class;

        Result Get<Result> (long id, Expression<Func<DBLogisticsTemplate, Result>> selector);
        LogisticsItem[] GetItems ();
        Result[] Query<Result> (LTQueryParam query, IBasicPage paging, out int count) where Result : class;
        bool Set (DBLogisticsTemplate source, LogisticsTemplateDatum datum);
        long SetIsDefault (DBLogisticsTemplate source);
        bool SetIsEnable (DBLogisticsTemplate source, bool isEnable);
    }
}